# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mlite
pkgver=0.4.5
pkgrel=0
pkgdesc="Useful classes originating from MeeGo Touch"
url="https://github.com/sailfishos/mlite"
arch="all"
license="LGPL-2.1-only"
depends_dev="dconf-dev"
makedepends="$depends_dev
	qt5-qtbase-dev
	qt5-qttools-dev
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev"
source="https://github.com/sailfishos/mlite/archive/$pkgver/mlite-$pkgver.tar.gz"
options="!check" # Requires an impossible to replicate on CI environment

build() {
	qmake-qt5
	make
}

check() {
	xvfb-run make check
}

package() {
	INSTALL_ROOT="$pkgdir" make install

	# Remove installed tests
	rm -r "$pkgdir/opt"
}
sha512sums="
c42b24cae0e29e3fff337827c0a47285a019e73d7339d44f627ce9f419394e35417cbfc8185f49fe05680c7762822ee56329422b67ea27fdd45f2d0e0f4aecfc  mlite-0.4.5.tar.gz
"
